package com.zhijian.medical.service;


import com.zhijian.medical.entity.po.Dictionary;
import com.zhijian.medical.entity.vo.request.DictionarySearchVo;
import com.zhijian.medical.entity.vo.response.DictionaryVo;
import com.zhijian.medical.util.Page;

import java.util.List;

/**
 * 字典表 业务处理层
 *
 * @author HCG
 * @version 1.0
 * @date 2022-06-05 19:55:21
 */
public interface DictionaryService {

    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    Dictionary selectById(Long id);

    /**
     * 根据类型查询
     *
     * @param type
     * @return
     */
    DictionaryVo selectVoByType(String type);

    /**
     * 按照主键删除
     *
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增
     *
     * @param dictionary
     * @return
     */
    Long insert(Dictionary dictionary);

    /**
     * 更改
     *
     * @param dictionary
     * @return
     */
    boolean update(Dictionary dictionary);

    /**
     * 总数
     *
     * @param dictionarySearchVo
     * @return
     */
    Integer count(DictionarySearchVo dictionarySearchVo);

    /**
     * 列表
     *
     * @param dictionarySearchVo
     * @return
     */
    List<DictionaryVo> selectList(DictionarySearchVo dictionarySearchVo);

    /**
     * 分页查询
     *
     * @param dictionarySearchVo
     * @return
     */
    Page<DictionaryVo> selectPage(DictionarySearchVo dictionarySearchVo);

    /**
     * 动态修改
     *
     * @param record
     * @return
     */
    boolean updateByPrimaryKeySelective(Dictionary record);

}